import request from '@/utils/request.js'

export const getSearchSuggestions = (q) => {
  return request({
    method: 'GET',
    url: '/app/v1_0/suggestion',
    params: { q: q }
  })
}

export const getSearchResults = (params) => {
  return request({
    method: 'GET',
    url: '/app/v1_0/search',
    params: params
  })
}

export const getSearchHistories = () => {
  return request({
    method: 'GET',
    url: '/app/v1_0/search/histories'
  })
}
